package com.bjsxt.userscenter.auth.service;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.bjsxt.userscenter.auth.pojo.AMenu;
import com.bjsxt.userscenter.auth.pojo.ARoleMenu;
import com.bjsxt.userscenter.common.util.PageInfoUtil;

/**
 * 权限的Service
 * @author WangshSxt
 *
 */
public interface IAuthService
{
	/*---- 菜单操作开始 ----*/
	/**
	 * 保存一条菜单
	 * @param menu	菜单对象
	 * @return	json
	 * {
		    "code": "0", 
		    "info": "成功", 
		    "data": {
		        "id": "10", 
		        "effect": "1"
		    }
		}
	 */
	JSONObject saveOneMenuService(AMenu menu);
	
	/**
	 * 更新一条菜单
	 * @param menu
	 * @return
	 */
	JSONObject updateOneMenuService(AMenu menu);
	
	/**
	 * 删除一条菜单
	 * @param condMap
	 * @return
	 */
	JSONObject deleteOneMenuService(Map<String, Object> condMap);
	
	/**
	 * 查询一条菜单
	 * @param condMap
	 * @return
	 */
	AMenu findOneMenuService(Map<String, Object> condMap);
	
	/**
	 * 查询多条菜单记录
	 * Cond:条件
	 * @return
	 */
	List<AMenu> findCondListMenuService(PageInfoUtil pageInfoUtil,Map<String,Object> condMap);
	
	/**
	 * operType:menu:就是树形菜单,木有复选框
	 * roleMenu:就是分配权限有复选框
	 * 
	 * 
	 * <ul class="tree treeFolder collapse">
			<li><a href="tabsPage.html" target="navTab">框架面板</a>
				<ul>
					<li target="selectedObjId" rel="1"><a href="main.html" target="navTab" rel="main">我的主页</a></li>
					<li target="selectedObjId" rel="2"><a href="newPage1.html" target="navTab" rel="page1">页面一</a></li>
				</ul>
			</li>
			<li><a href="w_editor.html" target="navTab" rel="w_editor">编辑器</a></li>
		</ul>
	 */
	String proccedMenuTreeStr(String operType,String roleId);
	
	/*---- 菜单操作结束 ----*/
	
	/*---- 角色菜单操作开始 ----*/
	/**
	 * 保存一条角色菜单
	 * @param roleMenu	角色菜单对象
	 * @return	json
	 * {
		    "code": "0", 
		    "info": "成功", 
		    "data": {
		        "id": "10", 
		        "effect": "1"
		    }
		}
	 */
	JSONObject saveOneRoleMenuService(ARoleMenu roleMenu);
	
	/**
	 * 更新一条角色菜单
	 * @param roleMenu
	 * @return
	 */
	JSONObject updateOneRoleMenuService(ARoleMenu roleMenu);
	
	/**
	 * 删除一条角色菜单
	 * @param condMap
	 * @return
	 */
	JSONObject deleteOneRoleMenuService(Map<String, Object> condMap);
	
	/**
	 * 查询一条角色菜单
	 * @param condMap
	 * @return
	 */
	ARoleMenu findOneRoleMenuService(Map<String, Object> condMap);
	
	/**
	 * 查询多条角色菜单记录
	 * Cond:条件
	 * @return
	 */
	Map<String,Object> findCondListRoleMenuService(PageInfoUtil pageInfoUtil,Map<String,Object> condMap);
	/*---- 角色菜单操作结束 ----*/
}
